package com.leoman.work.entity;

import com.leoman.entity.BaseEntity;
import com.leoman.user.entity.UserInfo;

import javax.persistence.*;

/**
 * Created by Administrator on 2016/6/14 0014.
 */
@Table(name = "t_comment_works")
@Entity
public class WorkComment extends BaseEntity {

    @ManyToOne
    @JoinColumn(name = "from_user_id")
    private UserInfo userInfo;

    @Column(name = "works_id")
    private Long workId;

    @Column(name = "to_work_comment_id")
    private Long workCommentId;

    @ManyToOne
    @JoinColumn(name = "to_user_id")
    private UserInfo toUserInfo;

    @Column(name = "type")
    private Integer type;

    @Column(name = "praise")
    private Integer praise;

    @Column(name = "content")
    private String content;

    @Column(name = "status")
    private Integer typePlus;

    @Column(name = "is_detail")
    private Integer isDetail;

    @Column(name = "name")
    private String name;

    @Column(name = "is_read")
    private Integer isRead = 0;

    /*@Transient
    private UserInfo userInfo;*/

    @Transient
    private WorkVideo workVideo;

    @Transient
    private WorkComic workComic;

    @Transient
    private WorkNovel workNovel;

    @Transient
    private Work work;

    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public Long getWorkId() {
        return workId;
    }

    public void setWorkId(Long workId) {
        this.workId = workId;
    }

    public Integer getIsDetail() {
        return isDetail;
    }

    public void setIsDetail(Integer isDetail) {
        this.isDetail = isDetail;
    }

    public UserInfo getToUserInfo() {
        return toUserInfo;
    }

    public void setToUserInfo(UserInfo toUserInfo) {
        this.toUserInfo = toUserInfo;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPraise() {
        return praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getTypePlus() {
        return typePlus;
    }

    public void setTypePlus(Integer typePlus) {
        this.typePlus = typePlus;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public WorkVideo getWorkVideo() {
        return workVideo;
    }

    public void setWorkVideo(WorkVideo workVideo) {
        this.workVideo = workVideo;
    }

    public WorkComic getWorkComic() {
        return workComic;
    }

    public void setWorkComic(WorkComic workComic) {
        this.workComic = workComic;
    }

    public WorkNovel getWorkNovel() {
        return workNovel;
    }

    public void setWorkNovel(WorkNovel workNovel) {
        this.workNovel = workNovel;
    }

    public Work getWork() {
        return work;
    }

    public void setWork(Work work) {
        this.work = work;
    }

    public Long getWorkCommentId() {
        return workCommentId;
    }

    public void setWorkCommentId(Long workCommentId) {
        this.workCommentId = workCommentId;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }
}
